package com.service.impl;

import com.bean.Goods;
import com.bean.Orders;
import com.bean.Role;
import com.bean.User;
import com.dao.OrderGoodsMapper;
import com.dao.UserRoleMapper;
import com.service.OrderGoodsService;
import com.service.UserRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author FatterShadystart
 * @create 2023-02-01 11:05
 */
@Service
public class UserRoleServiceImpl implements UserRoleService {
    @Resource
    private UserRoleMapper userRoleMapper;


    @Override
    public Long selectByUserIdAndRoleId(User user, Role role) {
        return userRoleMapper.selectByUserIdAndRoleId(user,role);
    }

    @Override
    public Integer insert(Long userId, Long roleId) {
        return userRoleMapper.insert(userId,roleId);
    }

    @Override
    public Integer deleteBatch(List<Long> userRoleIdList) {
        return userRoleMapper.deleteBatch(userRoleIdList);
    }
}
